<!DOCTYPE html>
<html>xmlns:th="http://www.thymeleaf.org"
<head>

<body>
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
    <div class="container">

    </div>
    <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarTogglerDemo03" aria-controls="navbarTogglerDemo03" aria-expanded="false" aria-label="Toggle navigation">
        <span class="navbar-toggler-icon"></span>
    </button>
    <a class="navbar-brand" href="#">项目ID</a>

    <div class="collapse navbar-collapse" id="navbarTogglerDemo03">
        <ul class="navbar-nav mr-auto mt-2 mt-lg-0">
            <li class="nav-item active">
                <a class="nav-link" href="#">主页</a>
            </li>
            <li class="nav-item">
                <a class="nav-link" href="#">学生</a>
            </li>
            <li class="nav-item">
                <a class="nav-link disabled" href="#">项目</a>
            </li>
        </ul>
        <form class="form-inline my-2 my-lg-0">
            <input class="form-control mr-sm-2" type="search" placeholder="Search" aria-label="Search">
            <button class="btn btn-outline-success my-2 my-sm-0" type="submit">Search</button>
        </form>
    </div>
</nav>
</body>
<nav th:replace="layouts::navbar"></nav>

<div class="container"></div>
<h3>主面板</h3>
<p th:text="${versionNumber}"></p>
<hr>
<div class="row">
<div class="col-md-6">
    <h4>当前项目</h4>
    <table class="table table-bordered table-striped">
        <thead class="thead-dark">
        <tr>
            <th>项目名称</th>
            <th>项目状态</th>
        </tr>
        </thead>
        <tbody>
        <tr th:each="aProject : ${projects}">
        <td th:text="${aProject.name}"></td>
        <td th:text="${aProject.stage}"></td>
        </tr>
        </tbody>
    </table>
</div >
</div>
<div class="col-md-4">
    <canvas id="myPieChart height=" height="50" width="50"></canvas>
    <script>
        let charData ="[[${projectStatusData}]]"
    </script>
    <h4>当前学生</h4>
    <div class="row"></div>
    <table class="table table-bordered table-striped">
        <thead class="thead-dark">
        <tr>
            <th>学生微信</th>
            <th>微信号</th>
            <th>项目个数</th>
        </tr>
        </thead>
        <tbody>
        <tr th:each="aStudent : ${students}">
            <td th:text="${aStudent.name}"></td>
            <td th:text="${aStudent.wechatId}"></td>
            <td th:text="${aStudent.email}"></td>

        </tr>
        </tbody>
    </table>
</div >
<div class="col-nd-4">
<script type="text/javascript" th:src="@{js/myChart.js}"></script>
</div>
</html>